<ui:component xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<style type="text/css">
		.content {
			width:100%;
			height:330px;
			overflow:auto;
		}
	</style>
	
	<rich:modalPanel id="viewPanel" minWidth="480" minHeight="450" zindex="10000">
		<f:facet name="header">
			<h:outputText value="#{messages['permit.current_permit']}"/>
		</f:facet>

		<f:facet name="controls">
			<h:panelGroup>
				<h:graphicImage value="/img/close.png" styleClass="hidelink"
					id="hideViewPanel" />
				<rich:componentControl for="viewPanel" attachTo="hideViewPanel"
					operation="hide" event="onclick" />
			</h:panelGroup>
		</f:facet>

		<h:panelGroup rendered="#{permitType == 'BUILDING_PERMIT'}">
			<ui:include src="/permits/building/includes/viewPermitPanelCntsIncl.xhtml" />
		</h:panelGroup>
		<h:panelGroup rendered="#{permitType == 'OPERATION_PERMIT'}">
			<ui:include src="/permits/operation/includes/viewPermitPanelCntsIncl.xhtml" />
		</h:panelGroup>
		
		
		<br/>
		
		<div align="center">
			<a4j:commandButton value="#{messages['button.ok']}"
				oncomplete="#{rich:component('viewPanel')}.hide()">
				<f:setPropertyActionListener value="#{false}" target="#{viewPermitHelper.renderData}" />
			</a4j:commandButton>
		</div>
	</rich:modalPanel>
	
</ui:component>
